package by.plisitsa.railway.datamodel;

import java.sql.Time;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import by.plisitsa.railway.datamodel.enums.DayDepart;

@Entity
public class Schedule extends AbstractEntity {
	@Column
	private Time timeDepart;
	
	@Column
	@Enumerated(EnumType.ORDINAL)
	private DayDepart dayDepart;

	@ManyToOne(fetch = FetchType.LAZY, targetEntity = Route.class)
	private Route route;
	
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = Train.class)
	private Train train;

}